A widget for InstantSearch Android that lets users enter a search query.
SearchBox
, use these components:
SearchMode.AsYouType
triggers a search on each keystroke.SearchMode.OnSubmit
trigger a search on submitting the query.SearchBoxState
as a state model, which is an implementation of the SearchBoxView
interface.
You need to connect SearchBoxState
to the SearchBoxConnector
or SearchBoxViewModel
like any other SearchBoxView
implementation, and create a Compose UI view that handles the query input, you can directly use the SearchBoxState
as a state model.
It provides the query property along with the setText
function to streamline the design process of your custom Compose UI view.